/**
 * All right reserved@Raygo 2022~2030
 */

package com.raygo.runner.core.data;

import java.util.UUID;

/**
 * 单步执行结果
 *
 * @author Raygo
 * @since 2022年5月26日
 */
public class StepResult {
    /**
     * 唯一ID
     */
    private String uuid;

    /**
     * 名称描述
     */
    private String name;

    /**
     * 执行结果，0成功，1失败，2停止，3其他
     */
    private int result;

    /**
     * 结果值
     */
    private String value;

    /**
     * 判断条件
     */
    private String condition;

    /**
     * 无参构造
     */
    public StepResult() {
        this.uuid = UUID.randomUUID().toString();
    }

    /**
     * 构造
     *
     * @param name   名称
     * @param result 结果
     * @param value  值
     */
    public StepResult(String name, int result, String value) {
        this.name = name;
        this.result = result;
        this.value = value;
        this.uuid = UUID.randomUUID().toString();
    }

    /**
     * Get uuid value
     *
     * @return the uuid
     */
    public String getUuid() {
        return uuid;
    }

    /**
     * Get name
     *
     * @return the name
     */
    public String getName() {
        return name;
    }

    /**
     * Set name
     *
     * @param name
     */
    public void setName(String desc) {
        this.name = desc;
    }

    /**
     * Get result value
     *
     * @return the result
     */
    public int getResult() {
        return result;
    }

    /**
     * Set result to result
     *
     * @param result the result to set
     */
    public void setResult(int result) {
        this.result = result;
    }

    /**
     * Get value value
     *
     * @return the value
     */
    public String getValue() {
        return value;
    }

    /**
     * Set value to value
     *
     * @param value the value to set
     */
    public void setValue(String value) {
        this.value = value;
    }

    /**
     * Get condition value
     *
     * @return the condition
     */
    public String getCondition() {
        return condition;
    }

    /**
     * Set condition to condition
     *
     * @param condition the condition to set
     */
    public void setCondition(String condition) {
        this.condition = condition;
    }
}
